package xyz.myachin.downloader.workmanagers

import android.content.Context
import androidx.work.Worker
import androidx.work.WorkerParameters
import xyz.myachin.downloader.dm.Downloader

class RemoveFilesWork(context: Context, workerParams: WorkerParameters) :
    Worker(context, workerParams) {
    override fun doWork(): Result {
        if (Downloader.removeAllFinishedDownloads()) return Result.success()
        return Result.failure()
    }
}